VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "NewRout"
Attribute VB_Creatable = True
Attribute VB_Exposed = True
Attribute VB_Description = "New Routine Assist by Michael J. Cox"
Option Explicit

Dim myMainMenuItem As Object
Dim ConnectID As Long

Dim Add_A_Routine As clsAddARoutine

Sub ConnectAddin(VBInstance As Object)
    '**************************************
    '* Author : Michael J. Cox
    '* Date : 6/13/97
    '* Email : mikec247@ix.netcom.com
    '*
    '* Desc:
    '*   When the Addin is checked in the
    '*   Addin manager this module is called.
    '*   This routine adds the menu to the
    '*   VB IDE menu.
    '***********************************
    On Error GoTo EH
    
    Set gobjVBInst = VBInstance
    Set Add_A_Routine = New clsAddARoutine
    Set myMainMenuItem = gobjVBInst.AddInMenu.MenuItems.Add("Add a &New Routine...")
    
    ConnectID = myMainMenuItem.ConnectEvents(Add_A_Routine)
    Exit Sub
EH:
    MsgBox Err.Description
    Exit Sub
End Sub

Sub DisConnectAddin(mode As Integer)
    '**************************************
    '* Author : Michael J. Cox
    '* Date : 6/13/97
    '* Email : mikec247@ix.netcom.com
    '*
    '* Desc:
    '*   When the Addin is unchecked in the
    '*   Addin manager this module is called.
    '*   This routine removes the menu to the
    '*   VB IDE menu.
    '***********************************
    
    'unhook menu items from class objects----------------
    myMainMenuItem.DisconnectEvents ConnectID

    'remove main menu------------------------------------
    gobjVBInst.AddInMenu.MenuItems.Remove myMainMenuItem
End Sub

